Install

To use ADBLib.dll in your program follow the next steps:

  1. Create a framework for a multiple document application form App MFC AppWizard (exe), in database support choose Headers files only
  2. Copy all Adblib files in your app and rename ADBLibD.dll to ADBLib.dll moving it into your Debug directory, if Debug directory is not persent or you create it or you build your app once then move the file.
  3. Insert at the beginning of your "resource.h" the following line
    #include "resourceADBLib.h"
  4. Open the project settings dialog box, insert the library ADBLib.lib in the linker pane Object/Library modules, for debug version use ADBLibD.lib
  5. Define a CDAODatabaseobject somewhere in the source file (not in the body of a function because it will be deleted at the exit)
    CDaoDatabase db;
  6. In the InitInstance()  function of the application add the following code ( assumed that you want to access the dbase.mdb database).
    HINSTANCE hDLL = LoadLibrary("ADBLibDLL");
    db.Open( "C:\\dbase.mdb" );
    SetMainDatabase(&db);
  7. Make the header file ADBLib.h available to the various source file (put it in the main .H file so you don't have to add it to every form, e.g. if your app name is test.exe put it in test.h).


Now installation should be ok so you are ready for programming.